<include file="Public:pagerForm"/>
<div class="pageHeader">
    <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__CONTROLLER__/visit" method="post">
	<div class="searchBar">		
            <table class="searchContent">
                <tr>
                    <td>
                        图片名称<input type="text" name="name" value="<{$Think.post.name}>"/>
                    </td>
                    <td>
                        添加时间<input type="text" name="add_time" value="<{$Think.post.add_time}>" class="date" readonly="true"/>
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                </ul>
            </div>
	</div>
    </form>
</div>
<div class="pageContent">
   <div class="panelBar">
        <ul class="toolBar">            
            <li><a class="add" href="<{:U('Web/show',array('sign'=>code('3',1),'db'=>code('Banner',1)))}>" target="dialog" mask="true" width='600' height='400'><span>添加</span></a></li>                      
            <li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="id[]" href="<{:U('Web/del',array('db'=>code('Banner',1)))}>" class="delete"><span>批量删除</span></a></li>                  
            <li><a class="edit" href="__CONTROLLER__/show/id/{l_id}/sign/<?php echo code('3',1);?>/db/<?php echo code('Banner',1)?>" target="dialog" mask="true" warn="请选择一条信息" width='600' height='400'><span>修改</span></a></li>
            <li class="line">line</li>
        </ul>
    </div>
    <table class="table" width="80%" layoutH="108">
        <thead>
            <tr>         
                <th width="22"><input type="checkbox" group="id[]" class="checkboxCtrl"></th>
                <th width="60"  align="center">序号</th>
                <th width="80" align="center">名称</th>               
                <th width="100" align="center">图片</th> 
                <th width="120" >超链接</th> 
                <th width="60" orderField='sort_' <if condition="$_REQUEST['_order'] eq 'sort_'">class="<{$_REQUEST._sort}>"</if> align="center">排序</th> 
                <th width="60" align="center">状态</th>
                <th width="88" orderField='add_time' <if condition="$_REQUEST['_order'] eq 'add_time'">class="<{$_REQUEST._sort}>"</if> align="center">添加时间</th> 
                <th width="150" align="center">操作</th>
        </tr>
        </thead>
        <tbody>
            <foreach name='list' item="list">                
                <tr target="l_id" rel="<{$list.id}>">
                    <td><input name="id[]" value="<{$list.id}>" type="checkbox"></td>
                    <td><{$key+1}></td>
                    <td><{$list.name}></td>          
                    <td class="imgs"><img src="<{$Think.const.PUBLIC_URL}>Upload/<{$list.small_image}>" width="96px"/></td>
                    <td><{$list.imgurl}></td>
                    <td><{$list.sort_}></td>
                    <td><{$list.status|getStatus}></td>
                    <td><{$list.add_time|substr=0,10}></td>
                    <td>
                        <eq name="list['status']" value='1'>
                        <a href="<{:U('Web/changeStatus',array('id'=>code($list['id'],1),'status'=>code('2',1),'db'=>code('Banner',1)))}>" target="ajaxTodo" ><span>禁用</span></a> |
                        <else/>
                            <a href="<{:U('Web/changeStatus',array('id'=>code($list['id'],1),'status'=>code('1',1),'db'=>code('Banner',1)))}>" target="ajaxTodo" ><span>启用</span></a> |
                        </eq>
                        <a title="确定删除该图片" target="ajaxTodo" href="<{:U('Web/del',array('id'=>code($list['id'],1),'db'=>code('Banner',1)))}>" >删除</a>                       
                    </td>
                </tr>
            </foreach>
        </tbody>        
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共<{$totalCount}>条</span>          
        </div>
        <div class="pagination" targetType="navTab" totalCount="<{$totalCount}>" numPerPage="<{$numPerPage}>" pageNumShown="6"  currentPage="<{$currentPage}>"></div>
    </div>
</div>
<style type="text/css" media="screen">
    .imgs div{height:100px!important;}
</style>